package com.study.demo;

/**
 * 目标：完成电影信息的展示案例，理解面向对象编程的代码。
 *   "《长津湖》"，9.7,"吴京"
 *   "《我和我的父辈》"，9.6,"吴京"
 *   "《扑水少年》"，9.5,"王川"
 */
public class Test {
    public static void main(String[] args) {
        Movie m1 = new Movie("《长津湖》",9.7,"吴京");
        Movie m2 = new Movie("《我和我的父辈》",9.6,"吴京");
        Movie m3 = new Movie("《扑水少年》",9.5,"王川");
        Movie[] mv = new Movie[3];
        mv[0] = m1;
        mv[1] = m2;
        mv[2] = m3;
        for (int i = 0; i < mv.length; i++) {
            Movie m = mv[i];
            System.out.println("电影名称:"+m.getName());
            System.out.println("得分： "+m.getScore());
            System.out.println("主演： "+m.getActor());
            System.out.println("-------------------------------------");
        }
    }
}
